﻿<%@ Page Title="<%$ Concat:UIStrings.ExportForOfflineEditing,' &raquo; ResourceBlender.NET' %>" Language="C#" MasterPageFile="~/Layout.master" AutoEventWireup="true" CodeFile="ResourcesOffline.aspx.cs" Inherits="ResourcesOffline" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <asp:ScriptManager ID="scrUpdateLanguages" runat="server"></asp:ScriptManager>
        <asp:MultiView ID="mltMain" runat="server" ActiveViewIndex="0">
            <asp:View ID="viwNoApps" runat="server">
                <h1><asp:Literal ID="lblManageResourcesHeading" runat="server" Text="<%$ Resources:UIStrings, ManageResources %>" /></h1>
                <p><asp:Literal ID="litAddAppLink" runat="server" /></p>
            </asp:View>
            <asp:View ID="viwSelectResources" runat="server">
                <h1><asp:Literal ID="lblSelectResourcesHeading" runat="server" Text="<%$ Resources:UIStrings, ExportResources %>" /></h1>
                <div class="breadcrumbs">
                    <asp:HyperLink ID="lnkNavHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender.NET</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavResources" runat="server" NavigateUrl="~/ResourcesMain.aspx" Text="<%$ Resources:UIStrings, Resources %>" /> &gt; <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:UIStrings, ExportResources %>" />
                </div>
                <asp:ObjectDataSource ID="dsApplications" runat="server" TypeName="ResourceBlender.DAL.ResourceBlenderDAL" SelectMethod="GetApplications">
                    <SelectParameters>
                        <asp:Parameter Name="includeBundles" Type="Boolean" DefaultValue="false" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <p><asp:Literal ID="litPageDescription" runat="server" /></p>
                <div class="niceform">
                    <asp:UpdatePanel ID="updChlApplication" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <fieldset>
                                <legend><asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:UIStrings, SelectComponents %>" /></legend>
                                <div class="formrow block threecol">
                                    <div class="formcol">
                                        <label class="block"><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:UIStrings, Application %>" /></label>
                                        <asp:CheckBoxList ID="chlApplication" runat="server" DataSourceID="dsApplications" DataTextField="DisplayName" DataValueField="ID"
                                            AutoPostBack="True" CssClass="checks applicationChecks plain" RepeatLayout="Flow" OnSelectedIndexChanged="ShowLanguages">
                                        </asp:CheckBoxList>
                                    </div>
                                    <div class="formcol">
                                        <asp:Label ID="lblBundleName" runat="server" Text="Bundles" 
                                            AssociatedControlID="lstBundles" CssClass="block"></asp:Label>
                                        <asp:ListBox ID="lstBundles" runat="server" SelectionMode="Multiple" 
                                            Rows="10" Width="100%"></asp:ListBox>
                                    </div>
                                    <div class="formcol">
                                        <asp:Label ID="lblLanguages" runat="server" Text="Languages" 
                                            AssociatedControlID="lstLanguages" CssClass="block"></asp:Label>
                                        <asp:ListBox ID="lstLanguages" runat="server" SelectionMode="Multiple" 
                                            Rows="10" Width="100%"></asp:ListBox>
                                        <asp:RequiredFieldValidator ID="vldLanguages" ControlToValidate="lstLanguages" runat="server" ErrorMessage="At least one language must be selected"></asp:RequiredFieldValidator>
                                    </div>
                                    <asp:UpdateProgress ID="prgRadApplication" runat="server" 
                                        AssociatedUpdatePanelID="updChlApplication" 
                                        DisplayAfter="100">
                                        <ProgressTemplate>
                                            <div class="centered"><asp:Image ID="imgLoadingLanguagesSelection" runat="server" ImageUrl="~/images/ajax-loader.gif" AlternateText="Loading Languages..." /></div>
                                        </ProgressTemplate>
                                    </asp:UpdateProgress>
                                </div>
                                <div class="clear">&nbsp;</div>
                            </fieldset>
                            <asp:Label runat="server" ID="lblError" Visible="false" CssClass="error"></asp:Label>
                            <div class="checks actions">
                                <asp:Button ID="btnRefresh" runat="server" Text="Refresh Bundles / Languages"
                                    OnClick="ShowLanguages" CssClass="uniformbutton doublewidth btnGo" />
                                <asp:Button ID="btnToRBT" runat="server" Text="Export to RBT" CommandArgument="rbt" OnClick="Export" CssClass="uniformbutton btnRbt"  />
                                <asp:Button ID="btnToExcel" runat="server" Text="Export to XML" CommandArgument="xls" OnClick="Export" CssClass="uniformbutton btnXls"  />
                                <br />
                                <asp:CheckBox ID="chkZip" runat="server" Text="Export as zip file" Checked="true" CssClass="plain autowidth" />
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="chlApplication" 
                                EventName="SelectedIndexChanged" />
                            <asp:PostBackTrigger ControlID="btnToExcel" />
                            <asp:PostBackTrigger ControlID="btnToRBT" />
                        </Triggers>
                    </asp:UpdatePanel>
                </div>
            </asp:View>
        </asp:MultiView>
</asp:Content>

